package cn.itcast.aop;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Slf4j
@Aspect
@Component
public class NoticeAspect {
    @Pointcut("execution(* cn.itcast.service.DeptService.*(..))")
    public void suibian(){}

    //前置通知/*通过注解*/
    @Before("@annotation(cn.itcast.anno.LogOperation)")
    public void before(){
        log.info("before----------------------");
    }



}
